package com.example.spi.company;

import com.example.spi.api.InternetService;

import java.io.IOException;
import java.util.ServiceLoader;

/**
 * Project:spring-boot-spi-company
 * <p>
 * Title:Application.java
 * <p>
 * Description: 服务测试.
 * <p>
 * Copyrigth:Jiang Software LTD.co Copyright (c) 2022
 * <p>
 * 
 * @version 1.0
 * @since 1.8
 * @author jiang
 * @history 2022 jiang create
 */
public class Application {

	public static void main(String[] args) throws IOException {
		ServiceLoader<InternetService> loader = ServiceLoader.load(InternetService.class);
		for (InternetService provider : loader) {
			provider.connectInternet();
		}
	}

}
